<script>
	import Vue from 'vue'
	import config from './common/config.js'
	export default {
		globalData: {  
		    // 保证全局只有一个音频处于播放状态且录音与播放操作互斥
		    audioPlaying: false,
		    audioRecording: false,
				
				// 发布打卡圈子预选
				curCirname:'',
				curCirid:'',
		  },
		  // ...
		onLaunch: function() {
			uni.getSystemInfo({
				success: function(e) {
					// #ifndef MP
					Vue.prototype.StatusBar = e.statusBarHeight;
					if (e.platform == 'android') {
						Vue.prototype.CustomBar = e.statusBarHeight + 50;
					} else {
						Vue.prototype.CustomBar = e.statusBarHeight + 45;
					};
					// #endif
			
					// #ifdef MP-WEIXIN
					Vue.prototype.StatusBar = e.statusBarHeight;
					let custom = wx.getMenuButtonBoundingClientRect();
					Vue.prototype.Custom = custom;
					Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
					// #endif		
			
					
					if (e.model.search('iPhone X') != -1){
						Vue.prototype.isIpx = true;
					}else{
						Vue.prototype.isIpx = false;
					}
				}
			})
			
			Vue.prototype.token = '';
			Vue.prototype.isguest = 0; //标志是游客 默认不是
			Vue.prototype.lock_at = 0;	
			
			Vue.prototype.baseUrl = config.base_api
			Vue.prototype.version = config.version
			Vue.prototype.uploadApi = config.upload_api
			Vue.prototype.uploadVideo_api = config.uploadVideo_api
			Vue.prototype.uploadAudio_api = config.uploadAudio_api
			
			Vue.prototype.use_video = '';				//是否可上传视频
			Vue.prototype.use_audio = '';				//是否可上传音频
			Vue.prototype.use_share = '';				//是否可上传视频
			Vue.prototype.had_phone = null;			//是否绑定手机号
			
			Vue.prototype.post_tlid = null;			//打卡被回复订阅模板ID
			Vue.prototype.comment_tlid = null;	//评论被回复订阅模板ID
			Vue.prototype.reward_tlid = null;		//打赏被回复订阅模板ID
			
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css uParse为优化版本*/
	@import './common/css/app.css';
	/* #ifndef APP-NVUE */
	@import './common/css/wxParse.css';
	/* #endif */
	@import './common/css/icon.css';
</style>
